{extend name="public/common"} {block name="body"}

<style type="text/css">
	 .btn-success:hover{
	 	color: #fff;
	border-color: #66b1ff;
	background-color: #66b1ff;
	 }
</style>

<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i>
    
    玩家管理
    <span class="c-gray en">&gt;</span>
    登录日志
    <a class="btn btn-success radius r"
      style="line-height: 1.6em; margin-top: 3px"
      href="javascript:location.replace(location.href);" title="刷新">
      <i class="Hui-iconfont">&#xe68f;</i>
    </a>
  </nav>
  
   <div style="padding:20px;height:30px;">
  	
  	<div class="new_box">
 <div class="text-c" style="margin-top:10px;">
<form action="{:url('Member/jc_all')}" method="post" enctype="application/x-www-form-urlencoded" class="l" style="margin-left:20px;">
  
    <input type="text" name="us_sql" id="us_sql" placeholder=" 会员账号" style="width:250px" class="input-text" value="{$us_sql}">
     <input type="text" value="{$ip_sql}" name="ip_sql" id="ip_sql" placeholder=" IP地址" style="width:250px" class="input-text">
    
    <button class="btn btn-success" type="submit" onclick="search()"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
    
  </form>
  
</div>
<div class="page-container dataTables_wrapper">
      <div id="tab-system" class="HuiTab">
        <div class="tabCon">
          <div class="mt-20">
            <table
              class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
              <thead>
                <tr class="text-c">
                  <th>ID</th>
                  <th>操作类型</th>
                  <th>日志说明</th>
              
                  <th>操作时间</th>
                  <th>操作IP</th>
                  <th>操作账号</th>
                  <th>登录类型</th>
                </tr>
               
              </thead>
              <tbody>
                  {volist name="listes" id="item"}
              
                <tr class="text-c">
                  <td>{$item.id}</td>
                  <td>
                     {if condition="$item.rz_class eq 2"}
                    会员操作
                  {else/}
                    超级管理员操作
                 {/if}
                  </td>
                  <td>{$item.rz_test}</td>
                  <td style="display:flex;"><?php echo date("Y-m-d H:i:s",$item['rz_time']) ?></td>
                  <td>
                      <a href="javascript:fav_alert('用户资料','{:url('member/jc_all')}?ip_sql={$item.rz_ip}');" style="display:block;text-decoration:underline;">{$item.rz_ip}</a>

                  </td>
                  <td>{$item.rz_user}</td>
                  <td>
                      {if condition="$item.client eq 1"}
                            电脑端
                      {elseif condition="$item.client eq 2"/}
                            手机H5版
                      {elseif condition="$item.client eq 3"/}
                            安卓App
                      {elseif condition="$item.client eq 4"/}
                            苹果App
                      {else}
                            未知
                      {/if}
                  </td>

                   
                     {/volist}
                </tr>
              
              </tbody>
            </table>
          </div>
        </div>
      </div>
      <div class="dataTables_paginate paging_simple_numbers" style="width:100%;">
            <div style="float:left;">  
          每页显示<select name="limit" style="height:26px;" id="code">
              <option value="20" {if condition="$limit eq 20"}selected{/if}>
                20
              </option>
              <option value="50" {if condition="$limit eq 50"}selected{/if}>
                50
              </option>
              <option value="100" {if condition="$limit eq 100"}selected{/if}>
                100
              </option>
              
           </select>页
          </div>
            <span style="float:right;margin-left:-2px;">总共{$listes->lastPage()}页  当前第{$listes->currentPage()}页 ，共{$listes->total()}条</span>
            <div style="float:left;">{$listes->render()}</div>
    </div>
    </div>

 </div>

  </div>
{/block}

{block name="js"} 
<script type="text/javascript">
    $(function() {
  $('.skin-minimal input').iCheck({
    checkboxClass : 'icheckbox-blue',
    radioClass : 'iradio-blue',
    increaseArea : '20%'
  });
  $("#tab-system").Huitab({
    index : 0
  });

});
      function search(){
        var us_sql=$("#us_sql").val();
        var ip_sql=$("#ip_sql").val();
        $.ajax({
                type:"GET",
                url:"{:url('seelogin/search?id=57&cid=49')}",
                data:{'us_sql':us_sql,'ip_sql':ip_sql},
                success: function (data) {

                    $("#container").html(data);

                }
            }
        )
    }

</script>
<script>
$(function(){
var username=$("#us_sql").val();
var ip=$("#ip_sql").val();
var li=$(".am-pagination").children();
  for (i = 0; i < li.length; i++) {
        
        var url=li.eq(i).attr('href');
        if(url){
          li.eq(i).attr('href',url+'&&username='+username+'&&ip='+ip);
        }       
    }
  
})
$("#code").on('change',function(){
    var username=$("#us_sql").val();
    var ip=$("#ip_sql").val();
   
    var id = $(this).find('option:selected').val();
    window.location.href="/admin/member/jc_all?username="+username+"&&limit="+id+"&&ip="+ip;
  })
</script>
<script type="text/javascript">
  function fav_alert(title,url){
    var index = layer.open({
      type: 2,
      title: title,
      area: ['90%', '90%'],
      content: url
    });
  }
  </script>
{/block}
 
 
